package com.zhixi.pattern.notimportant.mediatorpattern.operation;

/**
 * 中介者抽象类
 *
 * @作者 ShuHaoNan
 * @邮箱 shuhaonan1@gmail.com
 * @时间 2020/11/17 9:01
 */
public abstract class AbstractMediator {

    /* 采购 */
    protected Purchase purchase;
    /* 销售 */
    protected Sale sale;
    /* 存货 */
    protected Stock stock;

    public AbstractMediator() {
        this.purchase = new Purchase(this);
        this.sale = new Sale(this);
        this.stock = new Stock(this);
    }

    /* 处理多个对象之间的关系 */
    public abstract void execute(String str, Object... objects);

    public Purchase getPurchase() {
        return purchase;
    }

    public Sale getSale() {
        return sale;
    }

    public Stock getStock() {
        return stock;
    }

}
